var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/b0352stu');

//定义一个规则对象
var Schema = mongoose.Schema;
var userSchema = new Schema({
    // jobname  不许删
    jobnumber: {
        type: String,
        required: true
    },
    name: {
        type: String,
        required: true
    },
    role: {
        type: String,
        required: true
    },
    // entrydata  不许删
    entrydate: {
        type: String,
        required: true
    },
    phone: {
        type: String,
        required: true
    }
});
module.exports = mongoose.model('Teacher', userSchema);